﻿<orchestra:DocumentView x:Class="Orchestra.Modules.Browser.Views.BrowserView"
                        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
				        xmlns:catel="http://catel.codeplex.com"
                        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
                        xmlns:orchestra="http://orchestra.codeplex.com"
                        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                        mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">
    
    <catel:StackGrid>
		<catel:StackGrid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
		</catel:StackGrid.RowDefinitions>
        
        <catel:StackGrid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </catel:StackGrid.ColumnDefinitions>

        <Button Command="{Binding GoBack}" ToolTip="Go back to the previous page" Style="{StaticResource SmallImageButtonStyle}">
            <Image Source="/Orchestra.Modules.Browser;component/Resources/Images/action_left.png" />
        </Button>

        <Button Command="{Binding GoForward}" ToolTip="Go forward to the next page" Style="{StaticResource SmallImageButtonStyle}">
            <Image Source="/Orchestra.Modules.Browser;component/Resources/Images/action_right.png" />
        </Button>

        <TextBox Text="{Binding Url}">
            <i:Interaction.Behaviors>
                <catel:SelectTextOnFocus />
                <catel:UpdateBindingOnTextChanged UpdateDelay="0" />
                <catel:KeyPressToCommand Key="Enter" Command="{Binding Browse}" />
            </i:Interaction.Behaviors>
        </TextBox>

        <Button Command="{Binding Browse}" ToolTip="Browse" Style="{StaticResource SmallImageButtonStyle}">
            <Image Source="/Orchestra.Modules.Browser;component/Resources/Images/action_browse.png" />
        </Button>

        <WebBrowser x:Name="webBrowser" Grid.ColumnSpan="4" />
    </catel:StackGrid>
    
</orchestra:DocumentView>
